import { delay } from 'roadhog-api-doc';
import Mock from 'mockjs';
const rm = Mock.Random;

export default delay({
  "Post /umi/login": (req, res) => {
    const { account, password } = req.body;
    if (account === 'yzl' && password === '123') {
      res.send(Mock.mock({
        "token": rm.string(18)
      }));
    } else {
      res.send({
        code: 202
      });
    }
  }
}, 1000);